import time

from selenium.webdriver.common.by import By

from Base.Base import Base


class Page(Base):
    #进入frame框架
    frame1 = (By.XPATH, '/html/body/div[3]/div[3]/div[1]/div/div[3]/div[1]/div[2]/iframe')

    #输入账号
    username = (By.NAME, 'email')
    #输入密码
    password = (By.NAME, 'password')
    #点击确认
    sbumit = (By.ID, 'dologin')

    dy = (By.ID, '_mail_component_11_11')

    def text1(self):
        return self.affirm_text(self.dy)

    def login(self):
        self.ope_url('https://mail.163.com/')

        self.frame(self.frame1)
        print('进入frame框架')
        self.send_keys(self.username, '18696472858')

        self.send_keys(self.password, 'woxhniljl520W')

        self.click(self.sbumit)
